<?php
namespace app\index\controller;

use app\common\controller\Base;
use app\index\model\DCharacter as CharacterModel;
use think\Request;

//角色类

class Character extends Base
{

    use \app\index\controller\traits\CurlRequest;

    protected $model;

    public function _initialize()
    {
        //基类授权
        //
        parent::_initialize();
        $this->model = new CharacterModel();
    }

    /**
     * 等级分布及流失列表
     */
    public function doList(Request $request)
    {
        $res = $this->model->doList();

        _callback($res);
    }

    /**
     * 等级分布及流失列表
     */
    public function doLevelCountTest()
    {
        $level = 1;
        dump($this->model->doLevelCount($level));
        dump($this->model->getLastSql());
        dump($this->model->doLevelCountActive($level, 7));
        dump($this->model->getLastSql());
    }

}
